package com.yss.reportworld.domain;

import java.util.Date;
import java.util.List;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yss.common.core.annotation.EasyExcel;
import com.yss.common.core.utils.easyexecl.IntegerConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.yss.common.core.web.domain.BaseEntity;

import javax.validation.constraints.Size;

/**
 * 需求bug信息对象 report_world_demand_bug_info
 *
 * @author yss
 * @date 2023-03-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("report_world_demand_bug_info")
public class DemandBugInfo extends BaseEntity {

    /**  */
    @ExcelIgnore
    @TableId("ID")
    private String id;

    /**
     * 需求/者bug编号
     */
    @ExcelProperty(value = "需求/者bug编号")
    @TableField("DEMAND_BUG_NUM")
    @Size(min = 0, max = 30, message = "需求/者bug编号长度不能超过30个字符")
    private String demandBugNum;

    /**
     * 需求/者bug
     */
    @ExcelProperty(value = "需求/BUG")
    @TableField("DEMAND_BUG_TYPE")
    private Integer demandBugType;

    /**
     * 外部/内部
     */
    @ExcelProperty(value = "外部/内部")
    @TableField("DEMAND_BUG_FSOURCE")
    private Integer demandBugFsource;

    /**
     * 需求内容
     */
    @ExcelProperty(value = "需求内容")
    @TableField("DESCRIPTION")
    private String description;

    /**
     * 版本号
     */
    @ExcelProperty(value = "版本号")
    @TableField("VERSION")
    private String version;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态", converter = IntegerConverter.class)
    @EasyExcel(readConverterExp = "1=正常,2=停用")
    @TableField("STATUS")
    private Integer status;

    /**
     * 需求BUG日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "需求BUG日期")
    @TableField("DEMAND_BUG_DATE")
    private Date demandBugDate;

    @ExcelIgnore
    @TableField(exist = false)
    private List<String> idList;
    /**
     * 历史版本号
     */
    @ExcelIgnore
    @TableField(exist = false)
    private String hisVersion;

    // 导出的时候选择 数据的主键
    @ExcelIgnore
    @TableField(exist = false)
    private String ids;
}
